package com.yuxi.Test;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.junit.Test;

import com.yuxi.Util.ExportOwnWord;
import com.yuxi.Util.ExportReSeachWord;
import com.yuxi.Util.PDFchangToImage;
import com.yuxi.Util.StringManageUtil;


public class test23 {
		@Test
		public void test(){
//			String str="1|2|3";
//			Pattern pattern = Pattern.compile(str);
//			Matcher matcher = pattern.matcher("4");
//			boolean b= matcher.matches();
//			System.out.println( b);
//			String str=",2,7,";
//			String str2="2,7,";
//			System.out.println(str2.substring(0,str2.length()-1));
			//System.out.println(StringManageUtil.removeDot(str));
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
			Long s=Long.parseLong("1471073127503");
			String  date= sdf.format(new Date(s));				
			System.out.println(date);
			
					
		}
		
		@Test
		public void test1(){
			ExportReSeachWord ex= new ExportReSeachWord("H:/", "test.html");
			Map dataMap=new HashMap();
			java.util.List ali= new ArrayList();
			List b=new ArrayList();
			
			b.add("1");
			b.add("2");
			
			ali.add(b);
			List c=new ArrayList();
			
			c.add("3");
			c.add("4");
			ali.add(c);
			dataMap.put("table1",ali);
			ex.createDoc(dataMap);
		}
		
		@Test
		public void test2(){
			String s="1搜日解2";
			Pattern pattern = Pattern.compile(".*日搜日解.*");
			Matcher matcher = pattern.matcher(s);
			boolean b= matcher.matches();
			System.out.println(b);
		}
		
		@Test
		public void test3(){
			System.out.println(1+StringManageUtil.removeDot(",wo,"));
			System.out.println(2+StringManageUtil.removeDot(",wo,2,"));
			System.out.println(3+StringManageUtil.removeDot(""));
		}
}
